From 992874e1fc412b091733008e37a2cc32e82f3546 Mon Sep 17 00:00:00 2001 From: Rupert Weber Date: Sat, 11 Sep 2010 21:17:34 +0200 Subject: [PATCH] create double format for every model Changes babl_model_new() to create a respective double format for every new registered model. That way applications and extensions can rely on the double format to always exist. --- babl/babl-model.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/babl/babl-model.c b/babl/babl-model.c index eb7eee4..4766b3b 100644 --- a/babl/babl-model.c +++ b/babl/babl-model.c @@ -23,6 +23,8 @@ #include "babl-internal.h" #include "babl-db.h" +static Babl *construct_double_format (Babl *model); + static int babl_model_destroy (void *data) { @@ -169,6 +171,7 @@ babl_model_new (void *first_argument, { babl = model_new (name, id, components, component); babl_db_insert (db, babl); + construct_double_format (babl); } else { @@ -224,7 +227,7 @@ static Babl *construct_double_format (Babl *model) int i; argument[args++] = model; - argument[args++] = babl_type ("double"); + argument[args++] = babl_type_from_id (BABL_DOUBLE); for (i = 0; i < model->model.components; i++) { -- 2.30.2